[NET] front: There's a small leak on a couple error paths in setup_device().
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 9 Jun 2006 13:10:32 +0000 (14:10 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 9 Jun 2006 13:10:32 +0000 (14:10 +0100)
commit720b2f61b3f55d5881b0d52222e05e18b146d811
tree89833aadf75e06aa8f7fdfeedd70efe25a9b8546
parent356da6585f7a4e292533395029987f8b126310d7
[NET] front: There's a small leak on a couple error paths in setup_device().
While there rearrange the ring setup order slightly to simplify error
path since netif_free() will cleanup once ring_ref is valid.  And use
get_zeroed_page() instead of __get_free_page()/memset().  Handle error if
bind_evtchn_to_irqhandler() fails, as bad info->irq value is likely to
cause oops later.  In create_device(), gnttab_free_grant_references()
is accidentally called twice on tx_head during cleanup from failed
gnttab_alloc_grant_references() on rx_head, which could corrupt
gnttab_free_count.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c